package 布隆过滤器;

import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnels;

/**
 * @author chedx
 * @data 2021/3/22 3:20 PM
 */
public class TestMain {
    public static void main(String[] args) {
        BloomFilter<Integer> filter =
                BloomFilter.create(Funnels.integerFunnel(),500,0.01);
        System.out.println(filter.mightContain(1));

        filter.put(1);

        System.out.println(filter.mightContain(1));
    }
}
